package br.com.registrofinancas.view;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.widget.Button;
import br.com.registrofinancas.R;
import br.com.registrofinancas.adapters.SplashScreenAdapter;

public class SplashScreenActivity extends DashBoardActivity{
	    
    private ViewPager splashScreenmPager;
    private SplashScreenAdapter mPagerAdapter;
    private Button btCadastra;
    private Button btLogin;

	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_splash_screen);	
		setHeader(getString(R.string.title_actitivy_menu), false, true);
		splashScreenmPager = (ViewPager) findViewById(R.id.activity_splash_screen_pg);       
		splashScreenmPager.setAdapter(new SplashScreenAdapter(this));
		
		btCadastra = (Button) findViewById(R.id.activity_splash_screen_bt_cadastrar);
		btCadastra.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(SplashScreenActivity.this,CadastraUsuarioActivity.class);
				startActivity(intent);
			}
		});
		
		btLogin = (Button) findViewById(R.id.activity_splash_screen_bt_login);
		btLogin.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(SplashScreenActivity.this,LoginActivity.class);
				startActivity(intent);
			}
		});		
		
	}

}
